﻿using Abp.Application.Services.Dto;
using Mt.Site.Application.WorkFlows.Dto.Manager;
using Mt.Site.Core.WorkFlows.Process.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Mt.Site.Application.WorkFlows
{
    public interface IWorkFlowManagerAppService : IBackEndAppService
    {
        Task ResetRuntimeData();

        /// <summary>
        /// 流程使用者删除拟稿箱里的稿件
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task DeleteAsync(List<Guid> idList);

        /// <summary>
        /// 管理员删除稿件
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task SuperDeleteAsync(List<Guid> idList);

        /// <summary>
        /// 作废稿件 
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task CancelAsync(List<Guid> idList);

        /// <summary>
        /// 还原作废的稿件（是否应该要记录操作日志？） 
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task RestoreAsync(List<Guid> idList);

        /// <summary>
        /// 已办结的稿件恢复执行
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ResumeExecuteAsync(PaperIdInput input);

        /// <summary>
        /// 编辑表单数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<SuperFormDataOutput> GetFormDataForEditAsync(PaperIdInput input);

        Task UpdateFormDataAsync(UpdateFormDataInput input);

        /// <summary>
        /// 回滚
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task RollBack(RollBackInput input);

        Task<PagedResultDto<PagedManagerPaperDto>> GetPagedPapers(PagedMangerPaperInput input);

        /// <summary>
        /// 修改意见
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateReplyMsgAsync(UpdateReplyInput input);

        /// <summary>
        /// 修改附加意见
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateAdditionalMsgAsync(UpdateAdditionalMsgInput input);

        Task SetPaperUnMarked(EntityDto<Guid> input);

        Task UpdateAudiTimeAsync(UpdateAuditTimeInput input);

        Task ArchiveAsync(PaperIdInput input);
    }
}
